package cn.wangyu.msblogadmin.common.base;


import cn.wangyu.msblogadmin.common.result.ResultModel;
import cn.wangyu.msblogadmin.common.utils.ResultUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;

/**
 * 基础controller
 *
 * @author wangyu
 * @version 1.0
 * @date 2021/4/21 23:25
 */
public class BaseController<T> {

    /**
     * 返回成功
     *
     * @return
     */
    protected ResultModel success() {
        return ResultUtil.success();
    }

    protected ResultModel success(Iterable<T> iterable){
        return ResultUtil.success(iterable);
    }

    protected ResultModel success(IPage<T> iterable){
        return ResultUtil.success(iterable);
    }

    protected ResultModel success(Object o){
        return ResultUtil.success(o);
    }
}
